package cn.com.tiza.spiro.jvm.gc.optimization;

/**
 * Created by TZ0643 on 2015-12-31.
 */
public class PutInEden4 {

    public static final int _10M = 1024 * 1024 * 10;

    public static void main(String[] args) throws InterruptedException {

        Thread.sleep(10000);

        byte[] b1, b2;

        System.out.println("alloc-1 8M...");
        b1 = new byte[_10M * 4 / 5];

        for(int i = 0; i < 20; i++) {
            Thread.sleep(3000);
            System.out.println("alloc-" + (2 + i) + " 10M...");
            b2 = new byte[_10M];
        }

        System.out.println("End...");
        Thread.sleep(10000);

    }
}
